#include "e2d/yml/trans/Serializer.h"

using Serializer = e2d::BasicSerializer;

template<>
 void Serializer::Encode<e2d::Grid>(YAML::Node& node, const e2d::Grid& inst)
{
	Encode<e2d::Object>(node, inst);
	SetVariable<glm::ivec3>(node, "gridIndex", inst.m_GridIndex);
	SetVariable<glm::ivec3>(node, "m_NumGrids", inst.m_NumGrids);

}


template<>
 bool Serializer::Decode<e2d::Grid>(const YAML::Node& node, e2d::Grid& inst)
{
	Decode<e2d::Object>(node, inst);
	GetVariable<glm::ivec3>(node, "gridIndex", inst.m_GridIndex);
	GetVariable<glm::ivec3>(node, "m_NumGrids", inst.m_NumGrids);

	return true;
}
